package com.ctgu.rabbitmq.rabbitmq.exchange.headersExchange;

import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ ClassName HeaderExchangeConsumer
 * @ Author Alex2
 * @ Date 2025/8/14 15:26
 **/
@Log4j2
@Component
public class HeadersExchangeConsumer {

    private static final String TAG = "Alex";

    @RabbitListener(queues = HeadersExchangeConfig.QUEUE_HR)
    public void receiveHR(String message) {
        log.debug("{} : HR 队列收到消息 : {}", TAG, message);
    }

    @RabbitListener(queues = HeadersExchangeConfig.QUEUE_IT)
    public void receiveIT(String message) {
        log.debug("{} : IT 队列收到消息 : {}", TAG, message);
    }
}